package cn.com.wantools.module.nas.enums;

public enum FileTypeEnum {
    IMAGE("image"),
    DOC("doc"),
    EXCEL("excel"),
    PPT("ppt"),
    PDF("pdf"),
    OTHER("other"),
    FOLDER("folder"),
    AUDIO("audio"),
    VIDEO("video"),
    HTML("html"),
    CSS("css"),


    ;
    private String fileType;
    FileTypeEnum(String fileType) {
        this.fileType = fileType;
    }

    public String getFileType() {
        return this.fileType;
    }

    public FileTypeEnum of(String fileType) {
        for (FileTypeEnum fileTypeEnum : FileTypeEnum.values()) {
            if (fileTypeEnum.fileType.equals(fileType)) {
                return fileTypeEnum;
            }
        }
        return null;
    }
}
